<template>
  <div class="chart-box flex-vertical w-100 h-100 pb-3 border-box grad-bg flex-vertical">
    <template>
      <div class="border-item tl"></div>
      <div class="border-item tr"></div>
      <div class="border-item br"></div>
      <div class="border-item bl"></div>
    </template>
    <div v-if="title" class="flex-header title-box flex-header text-left px-4 flex-item align-items-center">
      <div class="line"></div>
      <div class="line"></div>
      <div class="line"></div>
      <div class="text-main font-weight-bold title">{{ title }}</div>
    </div>
    <div class="flex-content px-4 pt-3 no-scroll">
      <slot></slot>
    </div>
  </div>
</template>

<script>

export default {
  props: {
    title: String
  }
}
</script>


<style lang="less" scoped>
@import url('~@/assets/style/variable.less');

.chart-box {
  position: relative;
  /*background: linear-gradient(to bottom right, rgb(1, 23, 90), #050138); */
  background: linear-gradient(to bottom right, rgb(1,51,104), #2f4c87); 
  /*box-shadow: 0 0 20px rgba(0, 137, 248, 0.8) inset; */
  box-shadow: 0 0 20px rgba(5, 101, 179, 0.8) inset;
  .border-item {
    position: absolute;
    background: @colorCommon;
    &::before {
      content: '';
      position: absolute;
      background: @colorCommon;
    }
    &::after {
      content: '';
      position: absolute;
      background: @colorCommon;
    }
    &.tl {
      top: 0;
      left: 0;
      width: 1.85rem;
      height: 0.16rem;
      &::before {
        left: 0;
        top: 0;
        width: 0.16rem;
        height: 1.2rem;
      }
      &::after {
        left: 0;
        top: 1.4rem;
        width: 0.16rem;
        height: 0.6rem;
      }
    }
    &.tr {
      top: 0;
      right: 0;
      width: 0.16rem;
      height: 1.85rem;
      &::before {
        right: 0;
        top: 0;
        width: 1.2rem;
        height: 0.16rem;
      }
      &::after { 
        right: 1.4rem;
        top: 0;
        width: 0.6rem;
        height: 0.16rem;
      }
    }
    &.br {
      bottom: 0;
      right: 0;
      width: 1.85rem;
      height: 0.16rem;
      &::before {
        right: 0;
        bottom: 0;
        width: 0.16rem;
        height: 1.2rem;
      }
      &::after { 
        right: 0;
        bottom: 1.4rem;
        width: 0.16rem;
        height: 0.6rem;
      }
    }
    &.bl {
      bottom: 0;
      left: 0;
      width: 1.85rem;
      height: 0.16rem;
      &::before {
        left: 0;
        bottom: 0;
        width: 0.16rem;
        height: 1.2rem;
      }
      &::after { 
        left: 0;
        bottom: 1.4rem;
        width: 0.16rem;
        height: 0.6rem;
      }
    }
  }

  .title-box {
    padding-top: 0.5rem;
    .line {
      width: 0.2rem;
      height: 1.25rem;
      background: @colorCommon;
      margin-right: 0.4rem;
      transform: rotate(25deg);
      &:nth-of-type(2) {
        opacity: 0.6;
      }
      &:nth-of-type(3) {
        opacity: 0.2;
        margin-right: 1rem;
      }
    }
    .title {
      text-shadow: 2px 2px 0px rgb(0 0 0 / 20%)
    }
  }
}
</style>

